package com.zone.domain.acticity.service.quota.policy.impl;

import com.zone.domain.acticity.model.aggregate.CreateActivityOrderAggregate;
import com.zone.domain.acticity.model.entity.ActivityOrderEntity;
import com.zone.domain.acticity.model.valobj.ActivityOrderTraceTypeEnum;
import com.zone.domain.acticity.repository.IActivityRepository;
import com.zone.domain.acticity.service.quota.policy.ITraceService;
import com.zone.domain.common.factory.FactoryName;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author: zongzi
 * @description: TODO
 * @date: 2025/3/12
 */
@Slf4j
@Service
public class NoPayTraceService implements ITraceService, FactoryName {
    @Autowired
    private IActivityRepository activityRepository;

    @Override
    public ActivityOrderEntity trace(CreateActivityOrderAggregate createActivityOrderAggregate) {
        return activityRepository.createNoPayActivityOrder(createActivityOrderAggregate);
    }

    @Override
    public String getName() {
        return ActivityOrderTraceTypeEnum.NO_PAY.getCode();
    }
}
